package com.marvels.financial.utils;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.marvels.common.utils.MarvelsLogUtil;
import com.marvels.common.utils.ServerProperties;
import com.marvels.financial.pay.service.PayService;
import com.marvels.financial.pay.ybpay.Api;
import com.marvels.financial.pay.ybpay.YbPayService;

public class Test {
	public static void main(String[] args) {
String payBatchId = YbPayService.getBatchId();
		
		String orderId = YbPayService.getReuqestNum("yb");
		System.out.println("orderId==>"+orderId+",orderId==>"+orderId);
		String merchantNo  = "10022181669";
		String appKey = "SQKK10022181669";
//		Map<String, String> params = new HashMap<String,String>();
//		params.put("customerNumber", merchantNo);
//		params.put("groupNumber", merchantNo);
//		params.put("batchNo", payBatchId);
//		params.put("orderId", orderId);
//		params.put("amount", "1.00");
//		params.put("accountName", "沈炎");
//		params.put("accountNumber", "6230580000071277490");
//		params.put("bankCode", "SZCB");
//		params.put("bankName", "平安银行");
//		params.put("bankBranchName", "");
//		params.put("provinceCode", "");
//		params.put("cityCode", "");
//		params.put("feeType", "SOURCE");
//		//0非加急 1加急
//		params.put("urgency", "1");
//		
//		
//		System.out.println("paySignal---param="+params.toString());
//		Map<String, Object> returnMap = Api.ybPost(params, "/rest/v1.0/balance/transfer_send",appKey);
//		System.out.println("paySignal---return="+returnMap.toString());
		
		
		List<String> list = new ArrayList<String>();
		list.add("");
		String orderNumber = YbPayService.join(",", list.iterator());
		Map<String, String> queryParams = new HashMap<>();
		queryParams.put("customerNumber", merchantNo);
		queryParams.put("batchNo", "2018110516020879099");
		queryParams.put("product", "");
		queryParams.put("orderId", orderNumber);
		System.out.println(Api.ybPost(queryParams, "/rest/v1.0/balance/transfer_query",appKey));
	}
}
